<?php

namespace app\model\platform;

use app\BaseModel;
use app\model\RatingScaleModel;
use think\model\relation\BelongsTo;

/**
 * 区域-任务量表
 */
class PlatformTaskRatingScaleModel extends BaseModel
{
    protected $name = 'platform_task_rating_scale';

    /**
     * 关联量表
     * @return BelongsTo
     */
    public function ratingScale(): BelongsTo
    {
        return $this->belongsTo(RatingScaleModel::class,'rating_scale_id')->bind([
            'rating_scale_name'=>'name',
            'rating_scale_cover'=>'cover',
        ]);
    }
}